<template>
    <view class="add-content">
        <view class="from-item">
            <view class="left-title">学段</view>
            <view class="right-input">
                <uni-data-select :localdata="range" :border="false" :clear="false"></uni-data-select>
            </view>
        </view>
        <view class="from-item">
            <view class="left-title">年级</view>
            <view class="right-input">
                <uni-data-select :localdata="range" :border="false" :clear="false"></uni-data-select>
            </view>
        </view>
        <view class="from-item">
            <view class="left-title">学科</view>
            <view class="right-input">
                <uni-data-select :localdata="range" :border="false" :clear="false"></uni-data-select>
            </view>
        </view>
    </view>
</template>

<script>
    import { getPeriod } from '@/api/home'
    export default {
        data(){
            return{
                datetimesingle: '',
                range: [
                    { value: 0, text: "4" },
                    { value: 1, text: "8" },
                    { value: 2, text: "12" },
                    { value: 2, text: "16" },
                    { value: 2, text: "20" },
                    { value: 2, text: "24" }
                ],
            }
        },
        created(){
            this.getPeriodData();
        },
        methods: {
            getPeriodData(){
                getPeriod({ deviceId: this.$store.state.user.deviceId}).then(res=>{
                    console.log(res)
                })
            }
        }
    }
</script>

<style lang="scss">
    .add-content{
        background: #fff;
        .from-item{
            padding: 10px 15px;
            border-bottom: 1px solid #ddd;
            display: flex;
            justify-content: space-between;
            align-items: center;
            .left-title{
                font-size: 18px;
                color:#3a3a3a;
            }
        }
    }
</style>
